package ioc07;

/**
 * Author:shixiaojun@itany.com
 * Date:2022/5/16 15:50
 * Version:1.0-SNAPSHOT
 * Description:
 */
public class SomeBean {

    private String name;

    public void setName(String name) {
        this.name = name;
    }

//    {
//        System.out.println("代码块,name:"+name);
//    }
//
//    public SomeBean() {
//        System.out.println("正在初始化,name:"+name);
//    }

    public void a(){
        System.out.println("name:"+name);
    }

    public void b(){
        System.out.println("正在销毁");
    }

    @Override
    protected void finalize() throws Throwable {
        System.out.println("销毁");
        super.finalize();
    }
}
